package com.samphanie.dries.ui.home;

import androidx.annotation.NonNull;
import androidx.paging.PagedListAdapter;

import com.samphanie.dries.model.Feed;
import com.samphanie.dries.ui.AbsListFragment;
import com.samphanie.lib.nav.annotation.FragmentDestination;
import com.scwang.smartrefresh.layout.api.RefreshLayout;

@FragmentDestination(pageUrl = "main/tabs/home", asStarter = true)
public class HomeFragment extends AbsListFragment<Feed, HomeViewModel> {

    @Override
    public PagedListAdapter getAdapter() {

        String feedType = getArguments() ==null? "all":getArguments().getString("feedType");

        return new FeedAdapter(getContext(), feedType);
    }


    @Override
    public void onLoadMore(@NonNull RefreshLayout refreshLayout) {

    }

    @Override
    public void onRefresh(@NonNull RefreshLayout refreshLayout) {

    }
}